#ifndef AIR_OPTIONS_PANEL_H
#define AIR_OPTIONS_PANEL_H

#include <QWidget>
#include <QtGui>
#include <QObject>

#include "src/vector3d.h"
#include "defines/global.h"

class AirOptionsPanel : public QWidget {
	Q_OBJECT

    public:
        AirOptionsPanel(QWidget * = 0);
        ~AirOptionsPanel(){};

        Vector3D getDirection() {return ((Vector3D(directionX, directionY, directionZ)).normalize()) * magnitude;};
        double getMagnitude() {return magnitude;};
        double getPeriod() {return period;};
        double getRepeat() {return repeat;};
        double getViscosity() {return viscosity;};
        unsigned int getType() {return type;};
        bool getActive() {return active;};

    signals:
        void updateDirection();
        void updateMagnitude();
        void updatePeriod();
        void updateRepeat();
        void updateViscosity();
        void updateType();
        void updateActive();

    private slots:
        void changeDirectionX(double _d) {directionX = _d; emit updateDirection();};
        void changeDirectionY(double _d) {directionY = _d; emit updateDirection();};
        void changeDirectionZ(double _d) {directionZ = _d; emit updateDirection();};
        void changeMagnitude(double _m) {magnitude = _m; emit updateMagnitude();};
        void changeViscosity(double _v) {viscosity = _v; emit updateViscosity();};
        void changePeriod(double _p) {period = _p; emit updatePeriod();};
        void changeRepeat(double _r) {repeat = _r; emit updateRepeat();};
        void changeType(int _t) {type = _t; emit updateType();};
        void changeActive(bool _a) {active = _a; emit updateActive();};
        void enablePeriodRepeat();

    private:
        bool active;
        unsigned int type;
        double directionX, directionY, directionZ;
        double magnitude;
        double period;
        double repeat;
        double viscosity;

        QLabel *periodLabel;
        QDoubleSpinBox *periodDoubleSpinBox;
        QLabel *repeatLabel;
        QDoubleSpinBox *repeatDoubleSpinBox;
};

#endif
